# $Id$
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Zuf <kontakt.zuf@gmail.com>
# Contributor: Darwin Bautista <djclue917@gmail.com>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=kdenlive
pkgver=17.08.1
pkgrel=1
pkgdesc="A non-linear video editor for Linux using the MLT video framework"
arch=(i686 x86_64)
url="https://www.kdenlive.org/"
license=(GPL)
groups=(kde-applications kdemultimedia)
depends=(knewstuff knotifyconfig kded kfilemetadata qt5-webkit mlt glu sdl_image hicolor-icon-theme qt5-quickcontrols)
makedepends=(extra-cmake-modules kdoctools v4l-utils python)
optdepends=('ffmpeg: for FFmpeg plugin'
            'cdrtools: for creation of DVD ISO images'
            'dvdauthor: for creation of DVD'
            'dvgrab: for firewire capture'
            'libdv: for webcam capture (if FFmpeg is not installed)'
            'recordmydesktop: for screen capture'
            'xine-ui: for DVD preview'
            'vlc: for DVD preview'
            'plasma-desktop: theme configuration')
source=("https://download.kde.org/stable/applications/${pkgver}/src/$pkgname-${pkgver}.tar.xz"{,.sig})
sha256sums=('107385b706f55bf1b8a68b7a9f71511418c2b226785963241f93a9292f0a4632'
            'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_LIBDIR=lib \
    -DBUILD_TESTING=OFF
  make
}

package() {
  make -C build DESTDIR="${pkgdir}" install
}

